package com.song.sort;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

public class TreeMapTest {
    public static void main(String[] args){

        Map<String , String > treeMap = new TreeMap<>((o1, o2) -> o1.compareTo(o2));  //如果传入 按传入法人排序，如果不传 按默认

        treeMap.put("ssa","dsad");
        treeMap.put("s","dsdsa");
        System.out.println(treeMap.toString());

        Map<String , String > map = new HashMap<>();
        map.put("s","dsda");

    }
}
